export function searchConfig() {
    const searchConfig = [
        {
          label: "用户名",
          prop: "userName",
          type: "input"
        },
        {
          label: "姓名",
          prop: "realName",
          type: "input"
        },
        {
            label: "性别",
            prop: "sex",
            placeholder: "请选择",
            type: "select",
            options: [
                { value: "1", label: "男" },
                { value: "0", label: "女" }
            ]
        },
        {
            label: "手机号",
            prop: "mobile",
            type: "input"
        }
    ]
    return searchConfig
}

export function tableConfig() {
    const tableConfig = {
        thead: [
          {
            type: "selection",
            width: 55,
            align: "center",
            fixed: 'left'
          },
          {
            label: "序号",
            type: 'index',
            width: 55,
            align: "center",
            fixed: 'left'
          },
          {
            label: "用户名",
            prop: "userName",
            align: "center",
            fixed: 'left'
          },
          {
            label: "头像",
            type: 'slot',
            slotName: 'userPhotoUrl',
            align: "center"
          },
          {
            label: "角色",
            prop: "roleName",
            align: "center"
          },
          {
            label: "真实姓名",
            prop: "realName",
            align: "center"
          },
          { 
            label: "性别", 
            prop: "sexName",
            align: "center" 
          },
          {
            label: "电话号",
            prop: "mobile",
            align: "center"
          },
          {
            label: "邮箱",
            prop: "email",
            align: "center"
          },
          {
            label: "更新时间",
            prop: "updateDate",
            align: "center"
          },
          {
            label: "操作",
            type: "slot",
            slotName: "operation",
            align: "center",
            width: 160,
            fixed: 'right'
          }
        ]
    }
    return tableConfig
}

export default { searchConfig, tableConfig }